package com.freight.base.service;

import com.freight.base.entity.Dict;
import com.freight.base.vo.DictDataVo;
import com.freight.base.vo.PDictDataVo;
import com.freight.core.base.FreightBaseService;

import java.util.List;

/**
 * 字典接口
 * @describe
 */
public interface DictService extends FreightBaseService<Dict, Long> {

    /**
     * 排序获取全部
     * @return
     */
    List<Dict> findAllOrderBySortOrder();

    /**
     * 通过type获取
     * @param type
     * @return
     */
    Dict findByType(String type);

    /**
     * 模糊搜索
     * @param key
     * @return
     */
    List<Dict> findByTitleOrTypeLike(String key);

    List<PDictDataVo> getTwoDictByType(String type);

    List<DictDataVo> getByType(String type);
}